import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: 'login' },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login')
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('@/views/home'),
    children: [
      {
        path: '/5-1',
        name: 'subjects',
        component: () => import('@/views/subject/index.vue')
      },
      {

        path: '/3',
        name: 'companys',
        component: () => import('@/views/companys/index.vue')

      },
      {
        path: '/5-3',
        name: 'tags',
        component: () => import('@/views/subject/tag.vue')
      },
      {
        path: '/5-2',
        name: 'lists',
        component: () => import('@/views/subject/list.vue')
      },
      {
        path: '/2-2',
        name: 'menu',
        component: () => import('@/components/menu')
      },
      {
        path: '/1',
        name: 'menu',
        component: () => import('@/components/panel')
      },
      {
        path: '/4-1',
        component: () => import('@/views/question_bank/basic_question-bank.vue')
      },
      {
        path: '/4-2',
        component: () => import('@/views/jingxuan/Selected_question-bank')
      },
      {
        path: '/4-3',
        component: () => import('@/views/list')
      },
      {
        path: '/4-4',
        component: () => import('@/views/new')
      },
      {
        path: '/2-1',
        name: 'user',
        component: () => import('@/components/user')
      }, {
        path: '/2-3',
        name: 'permission',
        component: () => import('@/components/permission')
      },
      {
        path: '/6',
        name: 'articles',
        component: () => import('@/components/articles')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
